package test11;

/**
 * Created by tianxiadiyishuai on 2017/10/25.
 */
public class Square implements Printx {
    float a=5;
    float duijiaoxian;
    float area;
    float length;
    public float getDuijiaoxian(){return sqrt
            (a*a+a*a);}

    private float sqrt(float v) {
        return v;
    }

    public float getArea(){return a*a;}
    public float getLength(){return 4*a;}
    @Override
    public void printMyWay() {
        System.out.println("正方形的面积="+getArea());
        System.out.println("正方形的周长="+getLength());

    }
}
